Repository navigation
refactor(contracts): bind only the interactor families an owner implements - #4821
Conversation
…ments Each family declares its catalog rows beside its binders, and the adapters take the rows to walk. The TV runtime and Vega pass their own families, so they no longer evaluate keyboard, clipboard, alert, settings, orientation and app-event binders. The unavailable-facts hub states every operation by name instead of calling each family's facts builder, which every owner evaluated whether or not it implements the family. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Owners that bind a subset of families import the adapters from this subpath, so the contracts export snapshot gains one specifier. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 10215d4. The verdict and the full list are in the summary comment.
|
At 10215d4 this change drops the hover refusal hint for some devices, so it is not yet a pure refactor. There are no conflicts and CI is green. On main, The rule: every unavailable hover fact the hub emits carries the hover refusal hint unless the cell has its own hint. The smallest fix is to move Not blocking, and fine to take or leave: the hub now copies about 60 operation keys by hand, and Not verified here: the code was read only. The tests were not run, the closure and bundle numbers in the PR body were not measured, and how the daemon renders the hover hint to CLI and MCP output was not traced. No budget file changes, so a gate does not lock in the gain. The fact-value change itself is confirmed from the main-side builder and the head hub. Once the hover hint is restored with that test, this is ready. |
… hover legs Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Fixed at
Local: build, typecheck, contracts, Vega, tv-cdp and Linux tests, eager-closure budgets, layering, fallow, production-exports. |
This comment has been minimized.
This comment has been minimized.
…on families Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Second optional note taken at WebDriver, Revyl, Limrun and the shared local set still pass the full catalog; those are left for a later change. |
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
This PR is ready. At 7976820 the hover hint is restored: platform-runtime-unavailable.ts wraps both legs in Not blocking, and you can take or leave it: the module doc at platform-runtime-unavailable.ts:23 says the hub never evaluates a family that every owner would then evaluate, but it value-imports All checks pass at 7976820 and there are no conflicts. Not verified here: the tests were not run locally. The parity test uses hint-carrying cells, so hint-less cells were checked by reading each main-side builder. The Apple walk tests do not cover watchOS, visionOS or iPadOS, which does not change this result. The closure and bundle numbers in the PR body were not measured. The earlier thread on the hover hint is fixed at this head, so it can be resolved: #4821 (comment). |
…one family edge Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Optional note taken at |
…nts-main * origin/main: refactor(contracts): bind only the interactor families an owner implements (#4821) refactor(gestures): move gesture algorithms out of contracts into @agent-device/gestures (#4823) docs(command-docs): add the shared option table and per-action option tables (#4824) docs(agents): hold a review to the PR's invariant and stop at a third round (#4835)
Summary
Two contracts aggregates made every runtime owner value-import every operation family:
interactor-operation-catalog.tsheld all 31 rows and the adapters, sotv-cdp/runtime.ts → catalog → keyboard-runtime.ts(and clipboard, alert, settings, orientation, app-event).platform-runtime-unavailable.tscalled each family's facts builder, 21 families in all.Now each family declares its rows beside its binders. The adapters move to
interactor-operation-binding.tsand take the rows to walk. The catalog is the concatenation, for owners that implement every family. The TV runtime (Tizen, webOS) and Vega pass their own families. The unavailable hub states each operation by name, as it already did for fold.No behaviour, wire, or plugin contract change. Facts still decide what binds. Not device-facing.
Value
Cherry-picked onto
0.22in a scratch copy: Tizen plugin dist 92,076 → 85,194 bytes, webOS 90,648 → 83,766. Revyl, which binds every family, grows 164,175 → 165,101.Validation
At 10215d4:
pnpm check:quick,check:layering,check:fallow,check:production-exports,check:package, and the eager-closure budget test pass. 252 targeted test files pass (contracts, tv-cdp, Vega, Linux, Tizen, webOS, Limrun, Revyl, webdriver, HarmonyOS, Android runtime, Apple navigation/system, repo guards). The unavailable facts value is byte-identical before and after for distinct per-cell inputs. New tests in tv-cdp and Vega fail if facts admit a catalog operation the owner does not bind.CI owns full unit coverage and device lanes. The final commit regenerates the contracts export snapshot for the new
interactor-operation-bindingsubpath.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.